<!--宾客入住-->
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>宾客入住</title>
    <link rel="stylesheet" href="../css/layui.css">
    <link rel="stylesheet" href="../css/bootstrap.min.css">
    <link href="../css/bootstrap-datepicker3.min.css" rel="stylesheet"/>
    <link href="../css/bootstrap-datetimepicker.min.css" rel="stylesheet"/>
    <style>
        #button1{
            position:absolute;
            left:300px;
            top:250px;
            width: 150px;
        }
        #button2{
            position:absolute;
            left:290px;
            top:350px;
            width: 150px;
        }
        a:link{
            text-decoration:none;
        }
    </style>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">MISS后台管理系统</div>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                    username
                </a>
            </li>
            <li class="layui-nav-item"><a href="">注销</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <!-- 侧边导航: <ul class="layui-nav layui-nav-tree layui-nav-side"> -->
                <li class="layui-nav-item">
                    <a href="index.html">首页</a>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">散客开单</a>
                    <dl class="layui-nav-child">
                        <dd><a href="Guests_check_in.html">宾客入住</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">订单</a>
                    <dl class="layui-nav-child">
                        <dd><a href="Order.html">所有订单</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">宾客结账</a>
                    <dl class="layui-nav-child">
                        <dd><a href="Ordinary_invoicing.html">结账</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item layui-nav-itemed">
                    <a href="javascript:;">预定管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="Query_book.html">查询预定</a></dd>
                        <dd><a href="Add_a_reservation.html">添加预定</a></dd>
                        <dd><a href="Edit_reservation.html" style="background-color: #1E90FF">编辑预定</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">营业查询</a>
                    <dl class="layui-nav-child">
                        <dd><a href="Check-in_guest_enquiry.html">入住宾客查询</a></dd>
                        <dd><a href="Member_of_the_query.html">会员查询</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">系统设置</a>
                    <dl class="layui-nav-child">
                        <dd><a href="Data_management.html">数据管理</a></dd>
                        <dd><a href="VIP_set_up.html">VIP设置</a></dd>
                        <dd><a href="Billing_Settings.html">计费设置</a></dd>
                        <dd><a href="Set_up_the_room.html">房间设置</a></dd>
                        <dd><a href="Operator_setup.html">操作员设置</a></dd>
                    </dl>
                </li>
                 <li class="layui-nav-item">
                    <a href="javascript:;">订单信息</a>
                    <dl class="layui-nav-child">
                    <dd><a href="javascript:void(0);" onclick="tan()">查看订单信息</a></dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <div style="padding: 15px;">
            <h1>添加预定</h1><br/>
            <div class="layui-form-item">
                <form>
                    <div class="layui-inline">
                        <div class="layui-input-inline" style="width: 200px;">
                            <input type="text" name="price_min" placeholder="入住" value="2019-06-04 10:45" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-form-mid">-</div>
                        <div class="layui-input-inline" style="width: 200px;">
                            <input type="text" name="price_max" placeholder="离店" value="2019-06-04 10:45" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-form-mid">-</div>
                        <div class="layui-input-inline" style="width: 80px;">
                            <button type="button" name="price_max" autocomplete="off" class="layui-btn layui-btn-primary">共计2天</button>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">房间类型</label>
                        <select name="city" lay-verify="" class="form-control" style="width: 200px">
                            <option value="">请选择房间类型</option>
                            <option value="010">单人房</option>
                            <option value="021">标准房</option>
                            <option value="0571">大床房</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">宾客姓名</label>
                        <input type="email" class="form-control" placeholder="输入宾客姓名" value="郑杰" style="width: 200px">
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">宾客身份证</label>
                        <input type="email" class="form-control" placeholder="输入身份证号" value="510xxxxxx" style="width: 200px">
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">宾客手机号</label>
                        <input type="email" class="form-control" placeholder="输入手机号码" value="158xxxxx" style="width: 200px">
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">押金</label>
                        <input type="email" class="form-control" placeholder="输入押金" value="200" style="width: 200px">
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">会员等级</label>
                        <select name="city" lay-verify="" class="form-control" style="width: 200px">
                            <option value="">请选择会员等级</option>
                            <option value="010">普通会员</option>
                            <option value="021">白金会员</option>
                            <option value="0571">黑卡会员</option>
                        </select>
                    </div>
                    <button type="button" id="button1" class="layui-btn layui-btn-radius layui-btn-normal" onclick="sc()">修&#12288;&#12288;改</button>
                    <button type="reset" id="button2" class="layui-btn layui-btn-radius layui-btn-normal">重&#12288;&#12288;置</button>
                </form>
            </div>
        </div>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © MISS酒店
    </div>
</div>
 <div class="modal fade" id="webSocketModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
  <div class="modal-dialog" style="height: 300px">
    <div class="modal-content" >
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">订单信息</h4>
      </div>
      <div class="modal-body" style="height: 300px">
        <div class="form-group" style="float: left;"></br>
			 <textarea id="message_content" class="form-control" readonly="readonly" cols="80" rows="10"></textarea>
		</div>
       </div>
    </div>
  </div>
</div><!-- /.modal -->
<script src="../js/layui.all.js"></script>
<script src="../js/layui.js"></script>
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/bootstrap-datetimepicker.min.js"></script>
<script src="../js/bootstrap-datetimepicker.zh-CN.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $(".layui-inline input").datetimepicker({format:"yyyy-mm-dd hh:ii",language:"zh-CN",todayHighlight:true,todayBtn:true});
    });
</script>
<script>
function tan(){
	$("#webSocketModal").modal('show')
}
    function sc() {
        var a = confirm("确定要修改吗？");
        if (a == true) {
            alert("修改成功");
        }
    }
</script>
<script type="text/javascript">

var websocket = null;
//浏览器是否支持
if ('WebSocket' in window) {
  // 上面我们给webSocket定位的路径
  websocket = new WebSocket('ws://192.168.3.103:8080/webSocket');
} else {
  alert('该浏览器不支持websocket!');
}
//建立连接
websocket.onopen = function (event) {
  console.log('建立连接');
				
}
//关闭连接
websocket.onclose = function (event) {
  console.log('连接关闭');
}
//消息来的时候的事件
websocket.onmessage = function (event) {
  // 这里event.data就是我们从后台推送过来的消息
  console.log('收到消息:' + event.data);
  $('#message_content').append(event.data+'\n');
  // 在这里我们可以在页面中放置一个音乐，例如“您有新的订单了！”这样的提示音
  	document.getElementById("myAudio").play();
}

//发生错误时
websocket.onerror = function () {
  alert('websocket通信发生错误！');
}
//窗口关闭时，Websocket关闭
window.onbeforeunload = function () {
  websocket.close();
}

</script>
<audio src="../video/dingdong.mp3"  id="myAudio" ></audio>
</body>
</html>